import dynamic from 'dva/dynamic';

// wrapper of dynamic
const dynamicWrapper = (app, models, component) => dynamic({
  app,
  models: () => models.map(m => import(`../models/${m}.js`)),
  component,
});


export const TrainingInstitutionsTrainingManagement = (app) => {
  return {
    name: '培训管理(培训机构)',
    icon: 'renshizhaopin',
    path: 'TrainingInstitutionsTrainingManagement',
    children: [
      {
        name: '订单管理',
        path: 'OrderManagement',
        component: dynamicWrapper(app, [], () => import('../routes/Training/TrainingInstitutionsTrainingManagement/OrderManagement')),
      },
      {
        name: '学员管理',
        path: 'StudentManagement',
        component: dynamicWrapper(app, [], () => import('../routes/Training/TrainingInstitutionsTrainingManagement/StudentManagement')),
      },
      {
        name: '班级管理',
        path: 'ClassManagement',
        component: dynamicWrapper(app, [], () => import('../routes/Training/TrainingInstitutionsTrainingManagement/ClassManagement')),
      },
    ],
  };
};
